<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	template="/xhtml/bases/adminbase.xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:bargas="http://barganhas.com.br/barganhas">

	<ui:define name="headForm">
		<bargas:headForm headText="#{msg.privateAreaUsers} #{msg.privateAreaFormSeparatorHeader} #{msg.privateAreaActionView}"/>
	</ui:define>
	
	<ui:define name="formBody">
		<h:panelGrid styleClass="tableInputForm" columns="2" columnClasses="columnLabel, columnInput">
			<!-- status -->
			<h:outputLabel value="#{msg.msgStatus}:" for="userStatus"/>
			<bargas:outputTextConverted id="userStatus" value="#{userAccountBean.userAccount.status}" styleClass="" converterId="ConverterUserAccountStatus"/>
			
			<!-- since date -->
			<h:outputLabel value="#{msg.userAccountUserSinceDate}:" for="sinceDate"/>
			<bargas:outputTextConverted id="sinceDate" value="#{userAccountBean.userAccount.sinceDate}" styleClass="" converterId="ConverterSinceDate"/>
			
			<!-- fullname -->
			<h:outputLabel value="#{msg.privateAreaLoginName}:" for="fullname"/>
			<h:outputText value="#{userAccountBean.userAccount.fullname}" id="fullname"/>
			
			<!-- nickname -->
			<h:outputLabel value="#{msg.privateAreaLoginUser}:" for="nickname"/>
			<h:outputText value="#{userAccountBean.userAccount.nickname}" id="nickname"/>
			
			<!-- email -->
			<h:outputLabel value="#{msg.privateAreaLoginEmail}:" for="email"/>
			<h:outputText value="#{userAccountBean.userAccount.email}" id="email"/>
		</h:panelGrid>
		
		<t:saveState value="#{userAccountBean.userAccount}"/>
	</ui:define>
	
	<ui:define name="formButtons">
		<h:commandButton value="#{msg.privateAreaActionDelete}" styleClass="customButton buttonMainForm"
				action="#{userAccountBean.adminDeleteUser}" immediate="false" onclick="#{msg.actionConfirmDelete}"/>
		<h:commandButton value="#{msg.msgLock} #{msg.userAccount}" styleClass="customButton buttonMainForm"
				action="#{userAccountBean.adminLockUser}" immediate="false" onclick="#{msg.actionConfirmLock}"
				rendered="#{userAccountBean.userAccount.status eq 'ACTIVE'}"/>
		<h:commandButton value="#{msg.msgUnlock} #{msg.userAccount}" styleClass="customButton buttonMainForm"
				action="#{userAccountBean.adminUnlockUser}" immediate="false" onclick="#{msg.actionConfirmUnlock}"
				rendered="#{userAccountBean.userAccount.status eq 'LOCKED'}"/>
		<h:commandButton value="#{msg.privateAreaActionCancel}" styleClass="customButton buttonMainForm"
				action="#{userAccountBean.adminListUsers}" immediate="true"/>
	</ui:define>
	
</ui:composition>